package org.dromara.solonplugins.kafka1;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.kafka.common.serialization.StringSerializer;

/**
 * 生产者
 */
public class Kafka1ProducerProperties {

	private List<String> bootstrapServers;

	private String acks="all";

	private String bufferMemory;

	private String compressionType;

	private int batchSize=16384;

	private String clientId;

	/**
	 * 暂时不知道怎么用？
	 */
	@Deprecated
	private String transactionIdPrefix;

	private Class<?> keySerializer = StringSerializer.class;

	private Class<?> valueSerializer = StringSerializer.class;

	private Integer retries=0;
	
	/**
	 * Additional producer-specific properties used to configure the client.
	 */
	private final Map<String, String> properties = new HashMap<>();

	public List<String> getBootstrapServers() {
		return bootstrapServers;
	}

	public void setBootstrapServers(List<String> bootstrapServers) {
		this.bootstrapServers = bootstrapServers;
	}


	public String getBufferMemory() {
		return bufferMemory;
	}

	public void setBufferMemory(String bufferMemory) {
		this.bufferMemory = bufferMemory;
	}

	public String getCompressionType() {
		return compressionType;
	}

	public void setCompressionType(String compressionType) {
		this.compressionType = compressionType;
	}


	

	public int getBatchSize() {
		return batchSize;
	}

	public void setBatchSize(int batchSize) {
		this.batchSize = batchSize;
	}

	public String getClientId() {
		return clientId;
	}

	public void setClientId(String clientId) {
		this.clientId = clientId;
	}

	public Class<?> getKeySerializer() {
		return keySerializer;
	}

	public void setKeySerializer(Class<?> keySerializer) {
		this.keySerializer = keySerializer;
	}

	public Class<?> getValueSerializer() {
		return valueSerializer;
	}

	public void setValueSerializer(Class<?> valueSerializer) {
		this.valueSerializer = valueSerializer;
	}

	public Integer getRetries() {
		return retries;
	}

	public void setRetries(Integer retries) {
		this.retries = retries;
	}

	public String getAcks() {
		return acks;
	}

	public void setAcks(String acks) {
		this.acks = acks;
	}

	public String getTransactionIdPrefix() {
		return transactionIdPrefix;
	}

	public void setTransactionIdPrefix(String transactionIdPrefix) {
		this.transactionIdPrefix = transactionIdPrefix;
	}

	public Map<String, String> getProperties() {
		return properties;
	}

}
